package cn.matrix42.potoo.format.json.parser;

import cn.matrix42.potoo.annotation.Public;

@Public
public class JsonBuilder {

    JsonObject root = new JsonObject();

    public JsonBuilder addJsonLiteral(String key, JsonLiteral jsonLiteral) {
        root.put(key, jsonLiteral);
        return this;
    }

    public JsonBuilder addJsonArray(String key, JsonArray jsonArray) {
        root.put(key, jsonArray);
        return this;
    }

    public JsonBuilder addJsonObject(String key, JsonObject jsonObject) {
        root.put(key, jsonObject);
        return this;
    }

    public JsonObject build() {
        return root;
    }

}
